package com.example.dangerouscargodriver.ui.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.example.dangerouscargodriver.widget.ActionBar;
import com.example.dangerouscargodriver.R;

public class UserWalletActivity extends AppCompatActivity implements View.OnClickListener {

    private ActionBar mActionBar = null;
    private LinearLayout mEnterMyCard = null;
    private LinearLayout mEnterBillDetail = null;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_wallet);

        mActionBar = findViewById(R.id.actionBarWallet);
        mActionBar.setOnBackClickListener( new View.OnClickListener(){

            @Override
            public void onClick(View v) {
                finish();
            }
        });

        mEnterMyCard = findViewById(R.id.enter_my_card);
        mEnterMyCard.setOnClickListener(this);
        mEnterBillDetail = findViewById(R.id.enter_my_bill);
        mEnterBillDetail.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if(v.getId() == R.id.enter_my_card){
            Intent intent = new Intent(this, UserCardActivity.class);
            startActivity(intent);
        }
        else if(v.getId() == R.id.enter_my_bill){
            Intent intent = new Intent(this, BillDetailActivity.class);
            startActivity(intent);
        }
        else{

        }
    }
}